<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        ul {list-style: none; padding: 0}
        .btns li {
            float: left;
            margin: 5px;
        }
        hr {
            clear: both;
        }
    </style>
</head>
<body>
    <h2>分页功能</h2>
    <hr>

    <ul class="btns">

        {% for page in pages %}
            <li>
                <a href="{% url 'paginate2' page %}"> <button>{{ page }}</button> </a>
            </li>
        {% endfor %}

    </ul>

    <hr>
    <ul>
        {% for person in persons %}
            <li>{{ person.name }} - {{ person.age }}</li>
        {% endfor %}
    </ul>


</body>
</html>